package com.biz.hunter.dao;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.biz.hunter.db.entity.Evaluate;
import com.biz.hunter.dbutil.BaseDAO;


@Repository
public class EvaluateDAO {
	private static final String SQL_GET_HUNTER_EVALUATE = "select * from tb_evaluate  where hunterId = ? order by id desc";
	private static final String SQL_GET_ORDER_EVALUATE = "select * from tb_evaluate  where orderId = ? order by id desc";
	
	//已评价
	public List<Evaluate> getEvaByHunterId(int hunterId){
		return BaseDAO.queryForList(Evaluate.class, SQL_GET_HUNTER_EVALUATE,hunterId);
	}
	
	public Evaluate getEvaByOrderId(String orderId){
		return BaseDAO.queryForObject(Evaluate.class, SQL_GET_ORDER_EVALUATE, orderId);
	}
}
